﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="addNews.aspx.cs" Inherits="admin_addNews" %>
   
   
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
        <script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div class="Body_Title">
    系统信息管理 》》添加新闻</div>
    <table class="style1">
        <tr>
            <td>
                标题</td>
            <td>
                <asp:TextBox ID="tbxTitle" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                分类&nbsp;</td>
            <td>
                <asp:DropDownList ID="ddlLX" runat="server" AutoPostBack="True" 
                    DataSourceID="SqlDataSourceParentID" DataTextField="c_Name" 
                    DataValueField="cID">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSourceParentID" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                    SelectCommand="SELECT * FROM [classInfo] WHERE ([c_parentID] = @c_parentID)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="4" Name="c_parentID" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                内容:</td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:TextBox ID="Ckeditor" runat="server" Rows="10" Width="700px" Height="500px"
                    TextMode="MultiLine"></asp:TextBox>

                <script type="text/javascript">CKEDITOR.replace('<%=Ckeditor.ClientID %>')</script></td>
        </tr>
        <tr>
            <td>
                操作:</td>
            <td>
                <asp:Button ID="btnAdd" runat="server" Text="确定添加" onclick="btnAdd_Click" />
                <asp:Button ID="btnCancel" runat="server" Text="清除内容" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:SqlDataSource ID="SqlDataSourcexwgg" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                    InsertCommand="INSERT INTO xwgg(xwName, xwAuthor, xwClass, xwContent, xwTime) VALUES (@Param1, @Param2, @Param3, @Param4, @Param5)" 
                    SelectCommand="SELECT xwID, xwName, xwAuthor, xwTime, xwClass, xwContent FROM xwgg WHERE (xwID = @Param1)" 
                    
                    UpdateCommand="UPDATE xwgg SET xwName = @Param1, xwClass = @Param2, xwContent = @Param3 WHERE (xwID = @Param4)" 
                    oninserting="SqlDataSourcexwgg_Inserting" 
                    onselecting="SqlDataSourcexwgg_Selecting" 
                    onupdating="SqlDataSourcexwgg_Updating">
                    <InsertParameters>
                        <asp:Parameter Name="Param1" />
                        <asp:Parameter Name="Param2" />
                        <asp:Parameter Name="Param3" />
                        <asp:Parameter Name="Param4" />
                        <asp:Parameter Name="Param5" />
                    </InsertParameters>
                    <SelectParameters>
                        <asp:QueryStringParameter Name="Param1" QueryStringField="xwID" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Param1" />
                        <asp:Parameter Name="Param2" />
                        <asp:Parameter Name="Param3" />
                        <asp:Parameter Name="Param4" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        </table>
</asp:Content>

